<?php include __DIR__ . "/../../php/db.php"; ?>

<!DOCTYPE html>
<head>
	<title>Language</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css">
	<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css">
	<link href="css/bootstrap.min.resume.css" rel="stylesheet" type="text/css">
	<link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">
	<link href="css/resumestyle.css" rel="stylesheet" type="text/css">	

<?php

$login = $_SESSION['login'];

$userid = mysql_query("SELECT * FROM `flss`.`accounts` WHERE `user` = '$login'") or die(mysql_error());
while($rowshow = mysql_fetch_array($userid))
{
	$getid = $rowshow['account_id'];
}

if(isset($_POST['savepassport']))
{
	$passportnumber = $_POST['passportnumber'];
	$dateissue = $_POST['yearissue'].'-'.$_POST['monthissue'].'-'.$_POST['dayissue'];
	$dateexpire= $_POST['yearexpire'].'-'.$_POST['monthexpire'].'-'.$_POST['dayexpire'];
	$placeissue = $_POST['placeofissue'];
	mysql_query("UPDATE `passport` SET `number`='$passportnumber',`issue_date`='$dateissue',`expiry_date`='$dateexpire',`placeofissue`='$placeissue' WHERE `applicant_id`='$getid'");
	
}


?>
</head>
<body class="templatemo-bg-gray">
	<div class="container" style="overflow-x:hidden;">
		<div class="col-md-12">	
			<h1 class="text-center margin-bottom-15">Passport</h1>		
			<form class="form-horizontal templatemo-contact-form-2 templatemo-container"  method="post">
				<div class="row">
					<div class="col-md-6">
						<div class="form-group">				          		          	
				           	<div class="col-sm-12">
				            	<div class="templatemo-input-icon-container">
				            		<input type="text" name="passportnumber" class="form-control" id="name" placeholder="Number" style="width: 643px;" >
				            	</div>		            		            		            
				          	</div>              
				        </div>
				      </div>
				  </div>
					<div class="row">
					<div class="col-md-6" style="width: 380px;padding-right:0px;">
						<div class="col-md-12 form-group">			         				         
					         <div class="templatemo-inline-group">
					         	<div class="col-sm-12 templatemo-select-container">
					         		<label class="control-label">Issue Date</label> &nbsp; &nbsp; &nbsp;	&nbsp;  
									<select name="monthissue" id="selMonth" style="height: 32px;width: 102px;">
									  <option selected="" disabled="">Month</option>
									   <option value="01">January</option>
									   <option value="02">February</option>
									   <option value="03">March</option>
									   <option value="04">April</option>
									   <option value="05">May</option>
									   <option value="06">June</option>
									   <option value="07">July</option>
									   <option value="08">August</option>
									   <option value="09">September</option>
									   <option value="10">October</option>
									   <option value="11">November</option>
									   <option value="12">December</option>
									  </select>
									  <select name="dayissue" id="selDay" style="height: 32px;width: 57px;">
									  <option selected="" disabled="">Day</option>
									   <option value="1">1</option>
									   <option value="2">2</option>
									   <option value="3">3</option>
									   <option value="4">4</option>
									   <option value="5">5</option>
									   <option value="6">6</option>
									   <option value="7">7</option>
									   <option value="8">8</option>
									   <option value="9">9</option>
									   <option value="10">10</option>
									   <option value="11">11</option>
									   <option value="12">12</option>
									   <option value="13">13</option>
									   <option value="14">14</option>
									   <option value="15">15</option>
									   <option value="16">16</option>
									   <option value="17">17</option>
									   <option value="18">18</option>
									   <option value="19">19</option>
									   <option value="20">20</option>
									   <option value="21">21</option>
									   <option value="22">22</option>
									   <option value="23">23</option>
									   <option value="24">24</option>
									   <option value="25">25</option>
									   <option value="26">26</option>
									   <option value="27">27</option>
									   <option value="28">28</option>
									   <option value="29">29</option>
									   <option value="30">30</option>
									   <option value="31">31</option>
									  </select>
									  <input type="text" name="yearissue" id="txtYear" style="height: 32px;width: 67px;padding-left:5px;" placeholder="Year">	
							         </div>
								</div>
						    </div>
				      </div>
				      <div class="col-md-6" style="padding-left:0px;">
						<div class="col-md-12 form-group">			         				         
					         <div class="templatemo-inline-group">
					         	<div class="col-sm-12 templatemo-select-container">
					         		<label class="control-label">Expiry Date</label> &nbsp; &nbsp; &nbsp;	&nbsp;  
									<select name="monthexpire" id="selMonth" style="height: 32px;width: 102px;">
									  <option selected="" disabled="">Month</option>
									   <option value="01">January</option>
									   <option value="02">February</option>
									   <option value="03">March</option>
									   <option value="04">April</option>
									   <option value="05">May</option>
									   <option value="06">June</option>
									   <option value="07">July</option>
									   <option value="08">August</option>
									   <option value="09">September</option>
									   <option value="10">October</option>
									   <option value="11">November</option>
									   <option value="12">December</option>
									  </select>
									  <select name="dayexpire" id="selDay" style="height: 32px;width: 57px;">
									  <option selected="" disabled="">Day</option>
									   <option value="1">1</option>
									   <option value="2">2</option>
									   <option value="3">3</option>
									   <option value="4">4</option>
									   <option value="5">5</option>
									   <option value="6">6</option>
									   <option value="7">7</option>
									   <option value="8">8</option>
									   <option value="9">9</option>
									   <option value="10">10</option>
									   <option value="11">11</option>
									   <option value="12">12</option>
									   <option value="13">13</option>
									   <option value="14">14</option>
									   <option value="15">15</option>
									   <option value="16">16</option>
									   <option value="17">17</option>
									   <option value="18">18</option>
									   <option value="19">19</option>
									   <option value="20">20</option>
									   <option value="21">21</option>
									   <option value="22">22</option>
									   <option value="23">23</option>
									   <option value="24">24</option>
									   <option value="25">25</option>
									   <option value="26">26</option>
									   <option value="27">27</option>
									   <option value="28">28</option>
									   <option value="29">29</option>
									   <option value="30">30</option>
									   <option value="31">31</option>
									  </select>
									  <input type="text" name="yearexpire" id="txtYear" style="height: 32px;width: 67px;padding-left:5px;" placeholder="Year">	
							         </div>
								</div>
						    </div>
				      </div>
				    <div class="row">
						<div class="col-md-12 form-group" style="padding-left: 45px;">				         				         
					         <div class="templatemo-inline-group">
					         	<div class="col-sm-12 templatemo-select-container">
					         		<input type="text" placeholder="Place of issue" name="placeofissue" id="text6" style="width: 552px; height: 32px; padding-left:20px;">
					         		</div>
								</div>
				    	</div>
				  </div>
		        <div class="form-group">
		          <div class="col-md-12">
		            <input type="submit" value="SAVE" name="savepassport" class="btn btn-warning pull-right">		            
		          </div>
		        </div>		    	
		      </form>	
 
              
		</div>
	</div>
</body>
</html>